package com.example.game_community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("post")
public class Post {

    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String title;

    private String content;

    private Long authorId;

    private String sector;

    private LocalDateTime createTime;

    @TableField(exist = false)
    private List<Comment> comments; // 包含 user 信息的评论列表

    @TableField(exist = false)
    private User userInfo; // 包含 user 信息的评论列表

    @TableField(exist = false)
    private Long Total;

    @TableField(exist = false)
    private List<String> imageUrls;


}
